#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author:Charles.chen
# createDate:2017/9/5
# Title:
# Tip:
from app.toolkit.decoratorUtil import catchDbException
from app.model import User

# 根据账号和密码获得用户信息
def getUserByAccountAndPwd(account, pwd):
    user = findUserByAccountAndPwd(account, pwd)
    # if user:
    #     user = convertDbObjToDict(user,User)
    return user
    pass

@catchDbException
def findUserByAccountAndPwd(account, pwd):
    return User.get(account=account, pwd=pwd)


